simetrix.GraphProperty¶
- class simetrix.GraphProperty¶
Bases:
objectProperty for a
GraphObject. GraphProperty objects may have one of five types of value as defined in the following table:Type
Description
String
Simple string value
Real
Scalar real value
GraphObject
Reference to a
GraphObjectList of Strings
List of string values
List of GraphObjects
List of references to
GraphObjectobjectsFor more details see Graph Objects and their Properties
Methods
Attributes
Property name.
Set to a graph object if the graph property is of type GRAPHOBJECT.
Set to a list of graph objects if the graph property is of type GRAPHOBJECTLIST.
True if the property is read-only.
True if the property is read-only.
Set to a real value if the graph property is of type REAL.
Set to a string value if the graph property is of type STRING.
Set to a list of strings if the graph property is of type STRINGLIST.
Data type of property
Returns True if the property is valid.
Property value.
- property name: str¶
Property name.
- property object: GraphObject¶
Set to a graph object if the graph property is of type GRAPHOBJECT. Otherwise throws a run time error exception.
- property objects: list[GraphObject]¶
Set to a list of graph objects if the graph property is of type GRAPHOBJECTLIST. Otherwise throws a run time error exception.
- property protected: bool¶
True if the property is read-only. (Identical to
readOnly()).
- property readOnly: bool¶
True if the property is read-only. (Identical to
protected()).
- property real: float¶
Set to a real value if the graph property is of type REAL. Otherwise throws a run time error exception.
- property string: str¶
Set to a string value if the graph property is of type STRING. Otherwise throws a run time error exception.
- property strings: list[str]¶
Set to a list of strings if the graph property is of type STRINGLIST. Otherwise throws a run time error exception.
- property type: GraphPropertyType¶
Data type of property
- property valid: bool¶
Returns True if the property is valid. A False value will be returned, for example, if the
GraphObject.property()method is called specifying a non-existent property.
- property value: str | float | GraphObject | list[str] | list[GraphObject]¶
Property value. May be one of the five types described in the table above. Note that objects of class
GraphObjectare polymorphic which means that the actual type returned will be a class derived fromGraphObjectsuch as aCurveorGraph.Usually it is better to use one of the specialised value properties, namely objects, object, real, strings and string